<?php
/**
 * Template Name: home
 */
get_header(); ?>

	<div id="content">
		<div class="hightlight1">
			<div class="hightlight1-outer">
				<div class="hightlight1-inner">
					<h2 class="title">
						<img class="ui-general init-general1" alt="flag" src="<?php bloginfo('template_url'); ?>/images/transparent.png" />
						<span class="left">Đặt chổ qua mạng hoặc điện thoại</span>
					</h2>
					<div class="hightlight1-content">
						<?php get_template_part('content-menu'); ?>
						<form id="form-search" class="search-form" action="" method="post" >
							<p class="title-type2">Hãy chọn thành phố thuê xe và nơi cần đến</p>
							<div class="left-side">
								<ul>
									<li>
										<select class="custom-select" name="country">
											<option value="0"> Country </option>
										</select>
									</li>
									<li class="number-sit"><label>Xe bao nhiêu chỗ</label></li>
									<li>
										<label>Số ngày</label>
										<input class="txt-type1" type="text" name="account-status" />
									</li>
									<li>
									<a class="btn-type1" title="Tìm nhanh" href="#"><span><span>Tìm nhanh</span></span></a></li>
								</ul>
							</div>
							<div class="right-side">
								<ul>
									<li>
										<select class="custom-select" name="country">
											<option value="0"> Country </option>
										</select>
									</li>
									<li>
										<select class="custom-select" name="country">
											<option value="0"> Country </option>
										</select>
									</li>
									<li>
										<label>Số km</label>
										<input class="txt-type1" type="text" name="account-status" />
									</li>
									<li class="last">
										<p>Thuê xe hoặc gặp mọi trường hợp khẩn cấp</p>
										<p class="contact-number">
											hãy gọi:
											<br>
											<span>0907 980 787</span>
										</p>
									</li>
								</ul>
							</div>
						</form>
						<div class="slider-outer">
							<div class="slider1">
								<ul>
									<li><img alt="img-01" src="<?php bloginfo('template_url'); ?>/images/upload/Lighthouse.jpg" /></li>
								</ul>
							</div>
							<ul class="list-type2">
								<?php
									$loop = new WP_Query('posts_per_page=3');
									if ($loop->have_posts()) :
										$i = 0;
										while ($loop->have_posts()) : $loop->the_post();
											$i++;
								?>
									<li <?php if($i > 1) echo 'class="plus"'; ?>>
										<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
									</li>
								<?php endwhile; endif?>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div> <!-- .hightlight1 -->
		<div class="hightlight2">
			<div class="block2">
				<h3>Thông tin hình ảnh các loại xe Avala</h3>
				<?php
					$loop = new WP_Query('cat=1&posts_per_page=3');
					while ($loop->have_posts()) : $loop->the_post();
				?>
					<div class="article-block">
						<?php if (has_post_thumbnail) : ?>
						<a title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>">
							<?php the_post_thumbnail('tiny-thumb'); ?>
						</a>
						<?php endif; ?>
						<div class="info">
							<h4>
								<a title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
							</h4>
							<?php the_excerpt(); ?>
						</div>
					</div>
				<?php endwhile; ?>
			</div>
			<div class="block2 last">
				<h3>Thuê xe giá rẻ từ Hồ Chí Minh đi các nơi</h3>
				<?php
					$loop = new WP_Query('post_type=ticket_cars&posts_per_page=3');
					if ($loop->have_posts()) :
				?>
				<ul class="list-type3">
					<?php while ($loop->have_posts()) : $loop->the_post(); ?>
					<li>
						<span><?php echo get_post_meta($loop->post->ID, 'wpcf-destination', true); ?></span>
						<?php the_title(); ?>
					</li>
					<?php endwhile; ?>
				</ul>
				<?php endif?>
			</div>
		</div><!-- .hightlight2 -->
		
		<div class="hightlight1">
			<div class="hightlight1-outer1">
				<div class="hightlight1-inner">
					<h2 class="title">
						<img class="ui-general init-general2" alt="flag" src="<?php bloginfo('template_url'); ?>/images/transparent.png" />
						<span class="left">Đi đến những nơi lý tưởng</span>
					</h2>
					<div class="block2">
						<?php
							$loop = new WP_Query('cat=1&posts_per_page=5');
							if ($loop->have_posts()) :
						?>
						<ul class="list-type4">
							<?php while ($loop->have_posts()) : $loop->the_post(); ?>
							<li>
								<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
							</li>
							<?php endwhile; ?>
						</ul>
						<?php endif?>
						<span class="link-type1"><a title="readmore" href="#">Xem thêm</a></span>
					</div>
					<div class="block2 last">
						<?php
							$loop = new WP_Query('cat=1&posts_per_page=5');
							if ($loop->have_posts()) :
						?>
						<ul class="list-type4">
							<?php while ($loop->have_posts()) : $loop->the_post(); ?>
							<li>
								<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
							</li>
							<?php endwhile; ?>
						</ul>
						<?php endif?>
						<span class="link-type1"><a title="readmore" href="#">Xem thêm</a></span>
					</div>
				</div>
			</div>
		</div><!-- .hightlight1 second -->
	
	</div><!-- #content -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
